Optimal. Leaf size=44 \[ \frac {\sin (c+d x)}{a d}-\frac {\sin (c+d x) \cos (c+d x)}{2 a d}-\frac {x}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3872, 2839, 2637, 2635, 8} \[ \frac {\sin (c+d x)}{a d}-\frac {\sin (c+d x) \cos (c+d x)}{2 a d}-\frac {x}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2635
Rule 2637
Rule 2839
Rule 3872
Rubi steps
\begin {align*} \int \frac {\sin ^2(c+d x)}{a+a \sec (c+d x)} \, dx &=-\int \frac {\cos (c+d x) \sin ^2(c+d x)}{-a-a \cos (c+d x)} \, dx\\ &=\frac {\int \cos (c+d x) \, dx}{a}-\frac {\int \cos ^2(c+d x) \, dx}{a}\\ &=\frac {\sin (c+d x)}{a d}-\frac {\cos (c+d x) \sin (c+d x)}{2 a d}-\frac {\int 1 \, dx}{2 a}\\ &=-\frac {x}{2 a}+\frac {\sin (c+d x)}{a d}-\frac {\cos (c+d x) \sin (c+d x)}{2 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.28, size = 68, normalized size = 1.55 \[ -\frac {\cos ^2\left (\frac {1}{2} (c+d x)\right ) \sec (c+d x) \left (-4 \sin (c+d x)+\sin (2 (c+d x))-c+\tan \left (\frac {c}{2}\right )+2 d x\right )}{2 a d (\sec (c+d x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.69, size = 27, normalized size = 0.61 \[ -\frac {d x + {\left (\cos \left (d x + c\right ) - 2\right )} \sin \left (d x + c\right )}{2 \, a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.32, size = 58, normalized size = 1.32 \[ -\frac {\frac {d x + c}{a} - \frac {2 \, {\left (3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2} a}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.33, size = 85, normalized size = 1.93 \[ \frac {3 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}-\frac {\arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.45, size = 112, normalized size = 2.55 \[ \frac {\frac {\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {3 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a + \frac {2 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} - \frac {\arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.96, size = 30, normalized size = 0.68 \[ -\frac {\sin \left (2\,c+2\,d\,x\right )-4\,\sin \left (c+d\,x\right )+2\,d\,x}{4\,a\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\sin ^{2}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________